using System;
using NUnit.Framework;
using DotNetXmlSwfChart;

namespace DotNetXmlSwfChart.UnitTest
{
    [TestFixture]
    public class LinkAreaFixture
    {
        [Test]
        public void ToSourceXml()
        {
            string testXml = 
                "<area x='10' " +
                      "y='20' " +
                      "width='100' " +
                      "height='50' " +
                      "url='http://google.com' " +
                      "priority='1' " +
                      "target='_blank' " +
                      "text='Google' " +
                      "font='Arial' " +
                      "bold='True' " +
                      "size='10' " +
                      "color='ffffff' " +
                      "background_color='000000' " +
                      "alpha='1' " +
                      "/>";
            LinkArea la = new LinkArea();
            la.X = 10;
            la.Y = 20;
            la.Width = 100;
            la.Height = 50;
            la.Url = "http://google.com";
            la.Priority = 1;
            la.Target = "_blank";
            la.Text = "Google";
            la.Font = "Arial";
            la.Bold = true;
            la.Size = 10;
            la.Color = "ffffff";
            la.BackgroundColor = "000000";
            la.Alpha = 1;
            Assert.AreEqual(testXml, la.ToSourceXML());
        }
    }
}
